#!/bin/bash

set -e -u

ROOT=$(cd $(dirname $0)/.. && pwd)

DEVDIR=/tmp/concourse-dev
KEYSDIR=$DEVDIR/keys

external_ip="$($ROOT/dev/util/external-ip)"

$ROOT/dev/util/docker run --rm --privileged -v $KEYSDIR/worker:/concourse-keys \
  concourse/concourse worker --tsa-host "$external_ip" "$@"
